package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RptPurchaseMapper;
import com.ruoyi.system.domain.RptPurchase;
import com.ruoyi.system.service.IRptPurchaseService;
import com.ruoyi.common.core.text.Convert;

/**
 * 采购原始数据Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-06-18
 */
@Service
public class RptPurchaseServiceImpl implements IRptPurchaseService 
{
    @Autowired
    private RptPurchaseMapper rptPurchaseMapper;

    /**
     * 查询采购原始数据
     * 
     * @param id 采购原始数据主键
     * @return 采购原始数据
     */
    @Override
    public RptPurchase selectRptPurchaseById(Long id)
    {
        return rptPurchaseMapper.selectRptPurchaseById(id);
    }

    /**
     * 查询采购原始数据列表
     * 
     * @param rptPurchase 采购原始数据
     * @return 采购原始数据
     */
    @Override
    public List<RptPurchase> selectRptPurchaseList(RptPurchase rptPurchase)
    {
        return rptPurchaseMapper.selectRptPurchaseList(rptPurchase);
    }

    /**
     * 新增采购原始数据
     * 
     * @param rptPurchase 采购原始数据
     * @return 结果
     */
    @Override
    public int insertRptPurchase(RptPurchase rptPurchase)
    {
        return rptPurchaseMapper.insertRptPurchase(rptPurchase);
    }

    /**
     * 修改采购原始数据
     * 
     * @param rptPurchase 采购原始数据
     * @return 结果
     */
    @Override
    public int updateRptPurchase(RptPurchase rptPurchase)
    {
        return rptPurchaseMapper.updateRptPurchase(rptPurchase);
    }

    /**
     * 批量删除采购原始数据
     * 
     * @param ids 需要删除的采购原始数据主键
     * @return 结果
     */
    @Override
    public int deleteRptPurchaseByIds(String ids)
    {
        return rptPurchaseMapper.deleteRptPurchaseByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除采购原始数据信息
     * 
     * @param id 采购原始数据主键
     * @return 结果
     */
    @Override
    public int deleteRptPurchaseById(Long id)
    {
        return rptPurchaseMapper.deleteRptPurchaseById(id);
    }
}
